class BankAccount:

    def __init__(self, account_number, balance):
        self._account_number = account_number
        self.__balance = balance

    def deposit(self, amount): # 存款
        self.__balance += amount

    def withdraw(self, amount):
        if amount <= self.__balance:
            self.__balance -= amount
            self.__pay_charge()
        else:
            print('资金不足')

    def __pay_charge(self):
        self.__balance -= 5

    def get_balance(self):
        return self.__balance

    def __str__(self):
        return '账号: {},余额: {}'.format(
            self._account_number,
            self.__balance)


account = BankAccount('123456', 1000)
account.deposit(200)
account.withdraw(300)
print(account.get_balance())
# 可以，但不建议
print(account._account_number)
# print(account.__balance)